package biz.datalk.industrialland.admin.modules.online.config.exception;


import biz.datalk.industrialland.common.exception.ApplicationException;
import biz.datalk.industrialland.common.result.UnifyResultCode;

/**
 * 数据访问异常
 *
 * @author tarofang@163.com
 * @date         2016年8月18日
 */
public class DBException extends ApplicationException {

	private static final long serialVersionUID = -6101832010644168784L;

	public static final String MESSAGE = "数据库访问异常";

	public DBException() {
		super(MESSAGE);
	}

	public DBException(String message) {
		super(message);
		this.code = UnifyResultCode.DB_ERROR;
	}

	public DBException(String code, String message) {
		super(message);
		this.code = code;
	}

	public DBException(String message, Throwable cause) {
		super(message, cause);
		this.code = UnifyResultCode.DB_ERROR;
	}

	public DBException(String code, String message, Throwable cause) {
		super(message, cause);
		this.code = code;
	}

	public DBException(Throwable cause) {
		super(cause);
		this.code = UnifyResultCode.DB_ERROR;
	}
}
